<?php
include_once("../db.php");
$db=new DB();
$id=$_REQUEST['id'];
$sql="select * from article where id='$id'"; 
$res=$db->get($sql);
 ?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>后台欢迎页</title>
	<link rel="stylesheet" href="../css/reset.css" />
	<link rel="stylesheet" href="../css/public.css" />
	<link rel="stylesheet" href="../css/content.css" />
</head>
<body marginwidth="0" marginheight="0">
	<div class="container">
		<div class="public-content">
			<div class="public-content-header">
				<h3>修改文章</h3>
			</div>
			<div class="public-content-cont">
			<form action="modify_handle.php" method="post">
				<div class="form-group">
					<label for="">文章标题</label>
					<input type="hidden" name="id" value="<?php echo $res[0]['id']?>">
					<input class="form-input-txt" type="text" name="title" value="<?php echo $res[0]['title']?>"/>
				</div>
				<div class="form-group">
					<textarea id="editor_id" name="content"  class="form-input-textara" style="width:700px;height:300px;">
					<?php
					 echo htmlspecialchars_decode($res[0]['content'],ENT_QUOTES);
					 ?>
					</textarea> 
				</div>
				<div class="form-group">
					<label for="">信息状态</label>
					<select >
					<option class="form-input-radius" type="checkbox" checked name="status" value="<?php echo $res[0]['status']?>"/>已通过</option>
					<option class="form-input-radius" type="checkbox" name="status" value="1"/>未通过</option>
					</select>
				</div>
				<div class="form-group">
					<label for="">所属菜单</label>
					<input class="form-input-txt" type="text" name="menu" value="<?php echo $res[0]['menu'] ?>" />
				</div>
				
				
				<div class="form-group">
					<label for="">录入时间</label>
					<input class="form-input-txt" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" value="<?php echo $res[0]['create_time'] ?>" name="create_time">
				</div>
				<div class="form-group" style="margin-left:150px;">
					<input type="submit" class="sub-btn" value="提  交" name="submit" />
					<input type="reset" class="sub-btn" value="重  置" name="reset" />
				</div>
				</form>
			</div>
		</div>
	</div>
<script src="../kingediter/kindeditor-all-min.js"></script>
<script src="../js/laydate.js"></script>
<script>
	 KindEditor.ready(function(K) {
                window.editor = K.create('#editor_id');
        });
</script>
</body>
</html> 
